/*
 * MyString.c
 *
 *  Created on: Feb 2, 2012
 *      Author: Georgios
 */


#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "MyStrings.h"


char * mytrim(char * str) {
	if (str == NULL) {
		return NULL;
	}

	int len = strlen(str);
	while (len-- > 0) {
		if (str[len] == ' ') {
			str[len] = '\0';
		} else {
			return str;
		}
	}
	return str;
}
